import java.io.FileWriter;
import java.io.IOException;
import java.text.DateFormat;
import java.util.Calendar;
import java.util.TimeZone;

public class Logger {
	protected static String	defaultLogFile	= "C:\\Users\\pviola\\workspace2.0_siani\\RyanRequest\\output\\fareslog.txt";

	public static void write(String s) throws IOException {
		write(defaultLogFile, s);
	}

	public static void write(String f, String s) throws IOException {
		DateFormat formater = DateFormat.getDateTimeInstance();
		formater.setTimeZone(TimeZone.getTimeZone("GMT-0"));

		FileWriter aWriter = new FileWriter(f, true);

		aWriter.write(formater.format(Calendar.getInstance().getTime()) + " " + s + "\n");
		aWriter.flush();
		aWriter.close();
	}
}
